Pro CDI 2 in Java EE 8 by Jan Beernink & Arjan Tijms
Author:Jan Beernink & Arjan Tijms
Language: eng
Format: epub
ISBN: 9781484243633
Publisher: Apress
It is important that if the get(Contextual<T> contextual, CreationalContext<T> creationalContext) method creates a new bean instance, this must be done using the given contextual and creational context instances. You may be wondering why CreationalContext must be passed as an argument here. The main reason for this is that this associates the given bean instance with the creational context. The CreationalContext interface has a release() method, which triggers all beans associated with that creational context to be destroyed. This is primarily used to destroy any @Dependent-scoped beans. These are associated with the creational context of the instance they are injected in. When that instance is destroyed, release() is called on CreationalContext, which causes the @Dependent-scoped beans to be destroyed.
You may notice that the Context interface does not have any methods to start, suspend, or destroy a scope instance. The main reason for this is that the methods in the Context interface are meant to be called only by the CDI container. Starting, suspending, or destroying a scope instance depends on the implementation of the scope and as such is not a concern of the CDI container. This does not mean that the context object can’t have methods that control the scope. On the contrary, if such methods are needed, the context object is the most logical place to put them as the context object is responsible for maintaining the scope. However, as these methods are called by library or application code and different scopes may have different requirements for such methods, these methods are not defined in the Context interface.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(11979)
Hello! Python by Anthony Briggs(9427)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9394)
The Mikado Method by Ola Ellnestam Daniel Brolund(9354)
Dependency Injection in .NET by Mark Seemann(8901)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(7899)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7419)
Grails in Action by Glen Smith Peter Ledbrook(7334)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7163)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6010)
Kotlin in Action by Dmitry Jemerov(4689)
Practical Vim (for Kathryn Amaral) by Drew Neil(3752)
Cracking the GRE Premium Edition with 6 Practice Tests, 2015 (Graduate School Test Preparation) by Princeton Review(3628)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3541)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3282)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(3246)
Microservices with Go by Alexander Shuiskov(3030)
Practical Design Patterns for Java Developers by Miroslav Wengner(2944)
Learning Java by Patrick Niemeyer & Daniel Leuck(2893)